package com.itlong.cloud.paymenthub;

import com.itlong.cloud.POJO.DTO.property.PropertyAddBankCardDTO;
import com.itlong.cloud.POJO.DTO.property.PropertyBankManageGetPageDTO;
import com.itlong.cloud.POJO.VO.property.BankCardInfoVO;
import com.itlong.cloud.POJO.VO.property.PropertyBankManageGetPageVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      物业银行卡管理暴露接口
 * </desc>
 *
 * @createDate 2018/09/20
 */
@FeignClient(name = "payment-hub-service")
public interface IPropertyBankCardManageServiceClient {

    /**
     * <desc>
     *      添加时获取物业银行手机号及支付密码信息
     * <desc/>
     *
     * @param  projectId
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/20
     */
    @PostMapping(path = "/property/system/bankCard/getBankPayConf")
    Map<String,Object> getBankPayConf(@RequestParam("projectId") String projectId);

    /**
     * <desc>
     *      验证银行账户唯一性
     * </desc>
     *
     * @param bankCardNo 银行卡号
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/20
     */
    @PostMapping(path = "/property/system/bankCard/checkBankCardOnly")
    Integer checkBankCardOnly(@RequestParam("bankCardNo") String bankCardNo,@RequestParam("bankCardId") String bankCardId);


    /**
     * <desc>
     *      删除银行卡
     * </desc>
     *
     * @param bankCardId
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/20
     */
    @PostMapping(path = "/property/system/bankCard/deleteBankCard")
    Integer deleteBankCard(@RequestParam("bankCardId") String bankCardId);

    /**
     * <desc>
     *      获取银行卡账号详情
     * </desc>
     *
     * @param bankCardId
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/20
     */
    @PostMapping(path = "/property/system/bankCard/getBankCardInfo")
    BankCardInfoVO getBankCardInfo(@RequestParam("bankCardId") String bankCardId);

    /**
     * <desc>
     *      查询项目下是否绑定手机号
     * </desc>
     *
     * @param projectId
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/20
     */
    @PostMapping(path = "/property/system/bankCard/getProjectBankPhone")
    String getProjectBankPhone(@RequestParam("projectId") String projectId);

    /**
     * <desc>
     *      添加银行卡
     * </desc>
     *
     * @param propertyAddBankCardDTO
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/20
     */
    @PostMapping(path = "/property/system/bankCard/addBankCard")
    String addBankCard(@RequestBody PropertyAddBankCardDTO propertyAddBankCardDTO) throws Exception;

    /**
     * <desc>
     *     获取抄银行卡账户列表
     * </desc>
     *
     * @param pageDTO   参数DTO
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/21
     */
    @PostMapping(path = "/property/system/bankCard/getPage")
    Page<PropertyBankManageGetPageVO> getPage(@RequestBody PropertyBankManageGetPageDTO pageDTO) throws Exception;

    /**
     * <desc>
     *      获取银行名称
     * </desc>
     *
     * @param bankName
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/27
     */
    @PostMapping(path = "/property/system/bankCard/getBanks")
    List<Map<String,Object>> getBanks(@RequestParam("bankName") String bankName);

    /**
     * <desc>
     *      获取物业银行卡列表
     * </desc>
     *
     * @param projectId
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/27
     */
    @PostMapping(path = "/property/system/bankCard/getBankCards")
    List<Map<String,Object>> getBankCards(@RequestParam("projectId") String projectId);
}
